package com.example.proyyj.Service;


import com.example.proyyj.Entity.User;
import com.example.proyyj.Impl.UserImpl;

import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class UserService implements UserImpl {
    @Resource
    UserImpl userimpl;

    /**
     * 用户登录
     *
     * @param ISUName 账号
     * @param Pwd     密码
     * @return
     */
    @Override
    public User login(String ISUName, String Pwd) {
        return userimpl.login(ISUName, Pwd);
    }

    /**
     * 邮箱登录
     *
     * @param EmailAddress
     * @return
     */
    @Override
    public User getUserByEmail(String EmailAddress) {
        return userimpl.getUserByEmail(EmailAddress);
    }

    /**
     * 指纹登录
     *
     * @param fingerPrintId
     * @return
     */
    @Override
    public User fingerprintLogin(String fingerPrintId) {
        return userimpl.fingerprintLogin(fingerPrintId);
    }


    /**
     *用户注册
     * @param ISUName
     * @param Pwd
     * @param Phone
     * @param EmailAddress
     * @return
     */
    @Override
    public int regiter(String ISUName, String Pwd, String Phone, String EmailAddress) {
        return userimpl.regiter(ISUName, Pwd, Phone, EmailAddress);
    }

    /**
     * 更新用户头像
     * @param HeadImg
     * @param id
     * @return
     */
    @Override
    public int upHeadImag(String HeadImg, int id) {
        return userimpl.upHeadImag(HeadImg,id);
    }

    @Override
    public int upHeadImag1(String HeadImg) {
        return userimpl.upHeadImag1(HeadImg);
    }

    /**
     * 更新用户信息
     * @param ISUName
     * @param Pwd
     * @param Phone
     * @param EmailAddress
     * @return
     */
    @Override
    public int upuser(String ISUName, String Pwd, String Phone, String EmailAddress,int id) {
        return userimpl.upuser(ISUName,Pwd,Phone,EmailAddress,id);
    }
}
